package com.xhwl.logistics.controller;

import com.xhwl.common.dto.cent.sdata.AccountDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.query.cent.sdata.AccountQuery;
import com.xhwl.logistics.service.IOwnerInfoService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @description: 查询人员信息
 * @author: lu.Aaron
 * @create: 2021-06-02 09:30
 **/
//@RestController
@Api(tags = "查询人员信息")
@Slf4j
@RequestMapping("/user-info")
public class OwnerInfoController {
    @Autowired
    private IOwnerInfoService ownerInfoService;
    /**
     * 车主信息查询（查询主数据）
     *
     * @return
     */
    @GetMapping(value = "/get-user-info")
    public ResultJson getUserInfo(@RequestHeader(value = "appId", required = true) String appId,
                                  @RequestHeader(value = "clientType", required = false) Integer clientType,
                                  @RequestHeader(value = "industryId", required = true) Short industryId,
                                  AccountQuery accountQuery) {
        accountQuery.setIndustryId(industryId);
        List<AccountDTO> list =ownerInfoService.getUserInfo(accountQuery);

        return ResultJson.success(list);
    }
}

